<script type="text/javascript">
    $(document).ready(function(){
        $('.carousel').carousel({ pagination:true, loop:true, autoSlide:true, animSpeed:'fast' });
    });
</script>
<div class="width680">
    <div class="bx-content shadow ">
        <div class="carousel">
            <ul>
                <li><img src="<?php echo base_url('medias/uploads/demo/1359363341Clip 69 740x360.png') ?>" style="width: 680px;height: 350px;"/></li>
                <li> <img src="<?php echo base_url('medias/uploads/demo/1359363409LVN 750x360.png') ?>" style="width: 680px;height: 350px;"/></li>
                <li><img src="<?php echo base_url('medias/uploads/demo/1359714107TinhKiem.png') ?>" style="width: 680px;height: 350px;"/></li>
            </ul>
        </div>
    </div>
    <div class="clearfix height10"></div>
    <div class="featured clearfix">
        <div class="title">Sản phẩm nổi bật</div>
        <div class="bx-content">
             <?php
                $i=1;
                foreach($listFeatured as $key=>$item){
                    $margin="";
                    if($i==1){
                       $margin="margin0";
                    }
             ?>
                <div class="fea radus3 margin10 <?php echo $margin; ?>">
                    <div class="img">
                        <a href="<?php echo get_post_detail_url($item['id'],$item['name']) ?>"><img src="<?php echo $item['image'] ?>" /></a>
                    </div>
                    <div class="sabo">
                        <span class="tite"><a href="<?php echo get_post_detail_url($item['id'],$item['name']) ?>"><?php echo $item['name']; ?></a></span>
                        <?php
                        if(!empty($item['promotion'])){
                            echo  '<span class="price">'.number_format($item['promotion'],0,'.','.').' VNĐ</span>';
                        }
                        ?>
                    </div>
                </div>
             <?php
                $i++;
                if($i>3){
                    $i=1;
                }
             } ?>
        </div>
    </div>
</div>
<?php echo $this->load->view('_partials/sidebar'); ?>

